import UIKit

@available(iOS 6.0, *)
extension QKC where AA :UICollectionViewLayoutAttributes {
    open func frame_qk_s(_ frame:  CGRect) -> QKC<AA,YY,ZZ, CGRect>{
		return link(next: frame).then_QK { $0.value.frame = frame }
	}
    open func frame_qk_g() -> QKC<AA,YY,ZZ, CGRect>{
		 self +^ self.value.frame
	}

    open func center_qk_s(_ center:  CGPoint) -> QKC<AA,YY,ZZ, CGPoint>{
		return link(next: center).then_QK { $0.value.center = center }
	}
    open func center_qk_g() -> QKC<AA,YY,ZZ, CGPoint>{
		 self +^ self.value.center
	}

    open func size_qk_s(_ size:  CGSize) -> QKC<AA,YY,ZZ, CGSize>{
		return link(next: size).then_QK { $0.value.size = size }
	}
    open func size_qk_g() -> QKC<AA,YY,ZZ, CGSize>{
		 self +^ self.value.size
	}

    open func transform3D_qk_s(_ transform3D:  CATransform3D) -> QKC<AA,YY,ZZ, CATransform3D>{
		return link(next: transform3D).then_QK { $0.value.transform3D = transform3D }
	}
    open func transform3D_qk_g() -> QKC<AA,YY,ZZ, CATransform3D>{
		 self +^ self.value.transform3D
	}

    @available(iOS 7.0, *)
    open func bounds_qk_s(_ bounds:  CGRect) -> QKC<AA,YY,ZZ, CGRect>{
		return link(next: bounds).then_QK { $0.value.bounds = bounds }
	}
    @available(iOS 7.0, *)
    open func bounds_qk_g() -> QKC<AA,YY,ZZ, CGRect>{
		 self +^ self.value.bounds
	}

    @available(iOS 7.0, *)
    open func transform_qk_s(_ transform:  CGAffineTransform) -> QKC<AA,YY,ZZ, CGAffineTransform>{
		return link(next: transform).then_QK { $0.value.transform = transform }
	}
    @available(iOS 7.0, *)
    open func transform_qk_g() -> QKC<AA,YY,ZZ, CGAffineTransform>{
		 self +^ self.value.transform
	}

    open func alpha_qk_s(_ alpha:  CGFloat) -> QKC<AA,YY,ZZ, CGFloat>{
		return link(next: alpha).then_QK { $0.value.alpha = alpha }
	}
    open func alpha_qk_g() -> QKC<AA,YY,ZZ, CGFloat>{
		 self +^ self.value.alpha
	}

		// default is 0
    open func zIndex_qk_s(_ zIndex:  Int ) -> QKC<AA,YY,ZZ, Int >{
		return link(next: zIndex).then_QK { $0.value.zIndex = zIndex }
	}
    open func zIndex_qk_g() -> QKC<AA,YY,ZZ, Int >{
		 self +^ self.value.zIndex
	}

		// As an optimization, UICollectionView might not create a view for items whose hidden attribute is YES
    open func isHidden_qk_s(_ isHidden:  Bool ) -> QKC<AA,YY,ZZ, Bool >{
		return link(next: isHidden).then_QK { $0.value.isHidden = isHidden }
	}
    open func isHidden_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.isHidden
	}

    open func indexPath_qk_s(_ indexPath:  IndexPath) -> QKC<AA,YY,ZZ, IndexPath>{
		return link(next: indexPath).then_QK { $0.value.indexPath = indexPath }
	}
    open func indexPath_qk_g() -> QKC<AA,YY,ZZ, IndexPath>{
		 self +^ self.value.indexPath
	}

    open func representedElementCategory_qk_g() -> QKC<AA,YY,ZZ, UICollectionView.ElementCategory >{
		 self +^ self.value.representedElementCategory
	}

		// nil when representedElementCategory is UICollectionElementCategoryCell
    open func representedElementKind_qk_g() -> QKC<AA,YY,ZZ, String? >{
		 self +^ self.value.representedElementKind
	}

}

@available(iOS 6.0, *)
extension QKC where AA :UICollectionViewUpdateItem {
		// nil for UICollectionUpdateActionInsert
    open func indexPathBeforeUpdate_qk_g() -> QKC<AA,YY,ZZ, IndexPath? >{
		 self +^ self.value.indexPathBeforeUpdate
	}

		// nil for UICollectionUpdateActionDelete
    open func indexPathAfterUpdate_qk_g() -> QKC<AA,YY,ZZ, IndexPath? >{
		 self +^ self.value.indexPathAfterUpdate
	}

    open func updateAction_qk_g() -> QKC<AA,YY,ZZ, UICollectionViewUpdateItem.Action >{
		 self +^ self.value.updateAction
	}

}

@available(iOS 7.0, *)
extension QKC where AA :UICollectionViewLayoutInvalidationContext {
		// set to YES when invalidation occurs because the collection view is sent -reloadData
    open func invalidateEverything_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.invalidateEverything
	}

		// if YES, the layout should requery section and item counts from the collection view - set to YES when the collection view is sent -reloadData and when items are inserted or deleted
    open func invalidateDataSourceCounts_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.invalidateDataSourceCounts
	}

    @available(iOS 8.0, *)
    open func invalidatedItemIndexPaths_qk_g() -> QKC<AA,YY,ZZ, [IndexPath]? >{
		 self +^ self.value.invalidatedItemIndexPaths
	}

		// keys are element kind strings - values are NSArrays of NSIndexPaths
    @available(iOS 8.0, *)
    open func invalidatedSupplementaryIndexPaths_qk_g() -> QKC<AA,YY,ZZ, [String : [IndexPath]]? >{
		 self +^ self.value.invalidatedSupplementaryIndexPaths
	}

		// keys are element kind strings - values are NSArrays of NSIndexPaths
    @available(iOS 8.0, *)
    open func invalidatedDecorationIndexPaths_qk_g() -> QKC<AA,YY,ZZ, [String : [IndexPath]]? >{
		 self +^ self.value.invalidatedDecorationIndexPaths
	}

		// delta to be applied to the collection view's current contentOffset - default is CGPointZero
    @available(iOS 8.0, *)
    open func contentOffsetAdjustment_qk_s(_ contentOffsetAdjustment:  CGPoint ) -> QKC<AA,YY,ZZ, CGPoint >{
		return link(next: contentOffsetAdjustment).then_QK { $0.value.contentOffsetAdjustment = contentOffsetAdjustment }
	}
    @available(iOS 8.0, *)
    open func contentOffsetAdjustment_qk_g() -> QKC<AA,YY,ZZ, CGPoint >{
		 self +^ self.value.contentOffsetAdjustment
	}

		// delta to be applied to the current content size - default is CGSizeZero
    @available(iOS 8.0, *)
    open func contentSizeAdjustment_qk_s(_ contentSizeAdjustment:  CGSize ) -> QKC<AA,YY,ZZ, CGSize >{
		return link(next: contentSizeAdjustment).then_QK { $0.value.contentSizeAdjustment = contentSizeAdjustment }
	}
    @available(iOS 8.0, *)
    open func contentSizeAdjustment_qk_g() -> QKC<AA,YY,ZZ, CGSize >{
		 self +^ self.value.contentSizeAdjustment
	}

	// Reordering support
		// index paths of moving items prior to the invalidation
    @available(iOS 9.0, *)
    open func previousIndexPathsForInteractivelyMovingItems_qk_g() -> QKC<AA,YY,ZZ, [IndexPath]? >{
		 self +^ self.value.previousIndexPathsForInteractivelyMovingItems
	}

		// index paths of moved items following the invalidation
    @available(iOS 9.0, *)
    open func targetIndexPathsForInteractivelyMovingItems_qk_g() -> QKC<AA,YY,ZZ, [IndexPath]? >{
		 self +^ self.value.targetIndexPathsForInteractivelyMovingItems
	}

    @available(iOS 9.0, *)
    open func interactiveMovementTarget_qk_g() -> QKC<AA,YY,ZZ, CGPoint >{
		 self +^ self.value.interactiveMovementTarget
	}

    @available(iOS 8.0, *)
    open func invalidateItems_qk_f(at indexPaths: [IndexPath]) -> QKC<AA,YY,ZZ, [IndexPath]>{
		 self +^ self.value.invalidateItems(at:indexPaths) +^ indexPaths
	}

    @available(iOS 8.0, *)
    open func invalidateSupplementaryElements_qk_f(ofKind elementKind: String, at indexPaths: [IndexPath]) -> QKC<AA,YY,ZZ, String>{
		 self +^ self.value.invalidateSupplementaryElements(ofKind:elementKind, at:indexPaths) +^ elementKind
	}

    @available(iOS 8.0, *)
    open func invalidateDecorationElements_qk_f(ofKind elementKind: String, at indexPaths: [IndexPath]) -> QKC<AA,YY,ZZ, String>{
		 self +^ self.value.invalidateDecorationElements(ofKind:elementKind, at:indexPaths) +^ elementKind
	}

}

@available(iOS 6.0, *)
extension QKC where AA :UICollectionViewLayout {
	// To get the truth on the current state of the collection view, call methods on UICollectionView rather than these.
    open func collectionView_qk_g() -> QKC<AA,YY,ZZ, UICollectionView? >{
		 self +^ self.value.collectionView
	}

	// Subclasses must always call super if they override.
    open func invalidateLayout_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.invalidateLayout()
	}

    @available(iOS 7.0, *)
    open func invalidateLayout_qk_f(with context: UICollectionViewLayoutInvalidationContext) -> QKC<AA,YY,ZZ, UICollectionViewLayoutInvalidationContext>{
		 self +^ self.value.invalidateLayout(with:context) +^ context
	}

    open func register_qk_f(_ viewClass: AnyClass?, forDecorationViewOfKind elementKind: String) -> QKC<AA,YY,ZZ, AnyClass?>{
		 self +^ self.value.register(viewClass, forDecorationViewOfKind:elementKind) +^ viewClass
	}

    open func register_qk_f(_ nib: UINib?, forDecorationViewOfKind elementKind: String) -> QKC<AA,YY,ZZ, UINib?>{
		 self +^ self.value.register(nib, forDecorationViewOfKind:elementKind) +^ nib
	}

}

extension QKC where AA :UICollectionViewLayout {
		// Subclasses must override this method and use it to return the width and height of the collection view’s content. These values represent the width and height of all the content, not just the content that is currently visible. The collection view uses this information to configure its own content size to facilitate scrolling.
    open func collectionViewContentSize_qk_g() -> QKC<AA,YY,ZZ, CGSize >{
		 self +^ self.value.collectionViewContentSize
	}

		// Default implementation returns the layout direction of the main bundle's development region; FlowLayout returns leftToRight. Subclasses may override this to specify the implementation-time layout direction of the layout.
    open func developmentLayoutDirection_qk_g() -> QKC<AA,YY,ZZ, UIUserInterfaceLayoutDirection >{
		 self +^ self.value.developmentLayoutDirection
	}

		// Base implementation returns false. If your subclass’s implementation overrides this property to return true, a UICollectionView showing this layout will ensure its bounds.origin is always found at the leading edge, flipping its coordinate system horizontally if necessary.
    open func flipsHorizontallyInOppositeLayoutDirection_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.flipsHorizontallyInOppositeLayoutDirection
	}

	// Subclasses should always call super if they override.
    open func prepare_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.prepare()
	}

	// If the layout supports any supplementary or decoration view types, it should also implement the respective atIndexPath: methods for those types.
		// return an array layout attributes instances for all the views in the given rect
    open func layoutAttributesForElements_qk_f(in rect: CGRect) -> QKC<AA,YY,ZZ,[UICollectionViewLayoutAttributes]? >{
		 self +^ self.value.layoutAttributesForElements(in:rect)
	}

    open func layoutAttributesForItem_qk_f(at indexPath: IndexPath) -> QKC<AA,YY,ZZ,UICollectionViewLayoutAttributes?>{
		 self +^ self.value.layoutAttributesForItem(at:indexPath)
	}

    open func layoutAttributesForSupplementaryView_qk_f(ofKind elementKind: String, at indexPath: IndexPath) -> QKC<AA,YY,ZZ,UICollectionViewLayoutAttributes?>{
		 self +^ self.value.layoutAttributesForSupplementaryView(ofKind:elementKind, at:indexPath)
	}

    open func layoutAttributesForDecorationView_qk_f(ofKind elementKind: String, at indexPath: IndexPath) -> QKC<AA,YY,ZZ,UICollectionViewLayoutAttributes?>{
		 self +^ self.value.layoutAttributesForDecorationView(ofKind:elementKind, at:indexPath)
	}

		// return YES to cause the collection view to requery the layout for geometry information
    open func shouldInvalidateLayout_qk_f(forBoundsChange newBounds: CGRect) -> QKC<AA,YY,ZZ,Bool >{
		 self +^ self.value.shouldInvalidateLayout(forBoundsChange:newBounds)
	}

    @available(iOS 7.0, *)
    open func invalidationContext_qk_f(forBoundsChange newBounds: CGRect) -> QKC<AA,YY,ZZ,UICollectionViewLayoutInvalidationContext>{
		 self +^ self.value.invalidationContext(forBoundsChange:newBounds)
	}

    @available(iOS 8.0, *)
    open func shouldInvalidateLayout_qk_f(forPreferredLayoutAttributes preferredAttributes: UICollectionViewLayoutAttributes, withOriginalAttributes originalAttributes: UICollectionViewLayoutAttributes) -> QKC<AA,YY,ZZ,Bool>{
		 self +^ self.value.shouldInvalidateLayout(forPreferredLayoutAttributes:preferredAttributes, withOriginalAttributes:originalAttributes)
	}

    @available(iOS 8.0, *)
    open func invalidationContext_qk_f(forPreferredLayoutAttributes preferredAttributes: UICollectionViewLayoutAttributes, withOriginalAttributes originalAttributes: UICollectionViewLayoutAttributes) -> QKC<AA,YY,ZZ,UICollectionViewLayoutInvalidationContext>{
		 self +^ self.value.invalidationContext(forPreferredLayoutAttributes:preferredAttributes, withOriginalAttributes:originalAttributes)
	}

		// return a point at which to rest after scrolling - for layouts that want snap-to-point scrolling behavior
    open func targetContentOffset_qk_f(forProposedContentOffset proposedContentOffset: CGPoint, withScrollingVelocity velocity: CGPoint) -> QKC<AA,YY,ZZ,CGPoint >{
		 self +^ self.value.targetContentOffset(forProposedContentOffset:proposedContentOffset, withScrollingVelocity:velocity)
	}

		// a layout can return the content offset to be applied during transition or update animations
    @available(iOS 7.0, *)
    open func targetContentOffset_qk_f(forProposedContentOffset proposedContentOffset: CGPoint) -> QKC<AA,YY,ZZ,CGPoint >{
		 self +^ self.value.targetContentOffset(forProposedContentOffset:proposedContentOffset)
	}

}

extension QKC where AA :UICollectionViewLayout {
	// The updateItems parameter is an array of UICollectionViewUpdateItem instances for each element that is moving to a new index path.
    open func prepare_qk_f(forCollectionViewUpdates updateItems: [UICollectionViewUpdateItem]) -> QKC<AA,YY,ZZ, [UICollectionViewUpdateItem]>{
		 self +^ self.value.prepare(forCollectionViewUpdates:updateItems) +^ updateItems
	}

		// called inside an animation block after the update
    open func finalizeCollectionViewUpdates_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.finalizeCollectionViewUpdates()
	}

		// UICollectionView calls this when its bounds have changed inside an animation block before displaying cells in its new bounds
    open func prepare_qk_f(forAnimatedBoundsChange oldBounds: CGRect) -> QKC<AA,YY,ZZ, CGRect>{
		 self +^ self.value.prepare(forAnimatedBoundsChange:oldBounds) +^ oldBounds
	}

		// also called inside the animation block
    open func finalizeAnimatedBoundsChange_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.finalizeAnimatedBoundsChange()
	}

	// UICollectionView calls this when prior the layout transition animation on the incoming and outgoing layout
    @available(iOS 7.0, *)
    open func prepareForTransition_qk_f(to newLayout: UICollectionViewLayout) -> QKC<AA,YY,ZZ, UICollectionViewLayout>{
		 self +^ self.value.prepareForTransition(to:newLayout) +^ newLayout
	}

    @available(iOS 7.0, *)
    open func prepareForTransition_qk_f(from oldLayout: UICollectionViewLayout) -> QKC<AA,YY,ZZ, UICollectionViewLayout>{
		 self +^ self.value.prepareForTransition(from:oldLayout) +^ oldLayout
	}

		// called inside an animation block after the transition
    @available(iOS 7.0, *)
    open func finalizeLayoutTransition_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.finalizeLayoutTransition()
	}

	// For each element on screen after the invalidation, initialLayoutAttributesForAppearingXXX will be called and an animation setup from those initial attributes to what ends up on screen.
    open func initialLayoutAttributesForAppearingItem_qk_f(at itemIndexPath: IndexPath) -> QKC<AA,YY,ZZ,UICollectionViewLayoutAttributes?>{
		 self +^ self.value.initialLayoutAttributesForAppearingItem(at:itemIndexPath)
	}

    open func finalLayoutAttributesForDisappearingItem_qk_f(at itemIndexPath: IndexPath) -> QKC<AA,YY,ZZ,UICollectionViewLayoutAttributes?>{
		 self +^ self.value.finalLayoutAttributesForDisappearingItem(at:itemIndexPath)
	}

    open func initialLayoutAttributesForAppearingSupplementaryElement_qk_f(ofKind elementKind: String, at elementIndexPath: IndexPath) -> QKC<AA,YY,ZZ,UICollectionViewLayoutAttributes?>{
		 self +^ self.value.initialLayoutAttributesForAppearingSupplementaryElement(ofKind:elementKind, at:elementIndexPath)
	}

    open func finalLayoutAttributesForDisappearingSupplementaryElement_qk_f(ofKind elementKind: String, at elementIndexPath: IndexPath) -> QKC<AA,YY,ZZ,UICollectionViewLayoutAttributes?>{
		 self +^ self.value.finalLayoutAttributesForDisappearingSupplementaryElement(ofKind:elementKind, at:elementIndexPath)
	}

    open func initialLayoutAttributesForAppearingDecorationElement_qk_f(ofKind elementKind: String, at decorationIndexPath: IndexPath) -> QKC<AA,YY,ZZ,UICollectionViewLayoutAttributes?>{
		 self +^ self.value.initialLayoutAttributesForAppearingDecorationElement(ofKind:elementKind, at:decorationIndexPath)
	}

    open func finalLayoutAttributesForDisappearingDecorationElement_qk_f(ofKind elementKind: String, at decorationIndexPath: IndexPath) -> QKC<AA,YY,ZZ,UICollectionViewLayoutAttributes?>{
		 self +^ self.value.finalLayoutAttributesForDisappearingDecorationElement(ofKind:elementKind, at:decorationIndexPath)
	}

	// Return an array of index paths to indicate views that the layout is deleting or inserting in response to the update.
    @available(iOS 7.0, *)
    open func indexPathsToDeleteForSupplementaryView_qk_f(ofKind elementKind: String) -> QKC<AA,YY,ZZ,[IndexPath]>{
		 self +^ self.value.indexPathsToDeleteForSupplementaryView(ofKind:elementKind)
	}

    @available(iOS 7.0, *)
    open func indexPathsToDeleteForDecorationView_qk_f(ofKind elementKind: String) -> QKC<AA,YY,ZZ,[IndexPath]>{
		 self +^ self.value.indexPathsToDeleteForDecorationView(ofKind:elementKind)
	}

    @available(iOS 7.0, *)
    open func indexPathsToInsertForSupplementaryView_qk_f(ofKind elementKind: String) -> QKC<AA,YY,ZZ,[IndexPath]>{
		 self +^ self.value.indexPathsToInsertForSupplementaryView(ofKind:elementKind)
	}

    @available(iOS 7.0, *)
    open func indexPathsToInsertForDecorationView_qk_f(ofKind elementKind: String) -> QKC<AA,YY,ZZ,[IndexPath]>{
		 self +^ self.value.indexPathsToInsertForDecorationView(ofKind:elementKind)
	}

}

extension QKC where AA :UICollectionViewLayout {
    @available(iOS 9.0, *)
    open func targetIndexPath_qk_f(forInteractivelyMovingItem previousIndexPath: IndexPath, withPosition position: CGPoint) -> QKC<AA,YY,ZZ,IndexPath>{
		 self +^ self.value.targetIndexPath(forInteractivelyMovingItem:previousIndexPath, withPosition:position)
	}

    @available(iOS 9.0, *)
    open func layoutAttributesForInteractivelyMovingItem_qk_f(at indexPath: IndexPath, withTargetPosition position: CGPoint) -> QKC<AA,YY,ZZ,UICollectionViewLayoutAttributes>{
		 self +^ self.value.layoutAttributesForInteractivelyMovingItem(at:indexPath, withTargetPosition:position)
	}

    @available(iOS 9.0, *)
    open func invalidationContext_qk_f(forInteractivelyMovingItems targetIndexPaths: [IndexPath], withTargetPosition targetPosition: CGPoint, previousIndexPaths: [IndexPath], previousPosition: CGPoint) -> QKC<AA,YY,ZZ,UICollectionViewLayoutInvalidationContext>{
		 self +^ self.value.invalidationContext(forInteractivelyMovingItems:targetIndexPaths, withTargetPosition:targetPosition, previousIndexPaths:previousIndexPaths, previousPosition:previousPosition)
	}

    @available(iOS 9.0, *)
    open func invalidationContextForEndingInteractiveMovementOfItems_qk_f(toFinalIndexPaths indexPaths: [IndexPath], previousIndexPaths: [IndexPath], movementCancelled: Bool) -> QKC<AA,YY,ZZ,UICollectionViewLayoutInvalidationContext>{
		 self +^ self.value.invalidationContextForEndingInteractiveMovementOfItems(toFinalIndexPaths:indexPaths, previousIndexPaths:previousIndexPaths, movementCancelled:movementCancelled)
	}

}

